package com.briup.cms.web.controller;

import com.briup.cms.bean.CmsRole;
import com.briup.cms.service.impl.RoleServiceImpl;
import com.briup.cms.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: CMS
 * @BelongsPackage: com.briup.cms.web.controller
 * @Author: 韩振阳
 * @CreateTime: 2024-11-22  09:54
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
@Api(tags = "角色模块")
@Slf4j
@RequestMapping("/auth/role")
public class RoleController {
    @Autowired
    private RoleServiceImpl roleService;
    @ApiOperation(value = "获取全部角色")
    @GetMapping("/getAll")
    Result getAll(){
        List<CmsRole> all = roleService.getAll();
        return Result.success(all);
    }
}
